<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script src="js/jquery-3.4.1.min.js"></script>

        <h2>修仙小说</h2> 
        <ul>
            <li>凡人修仙传</li> 
            <li>遮天</li> 
            <li>神墓</li> 
            <li>残袍</li> 
            <li>大主宰</li> 
        </ul>

    <script>
       /* toggle()除了可以模拟鼠标的连续单击事件 */
       $("h2").click(function(){
           $("ul").toggle(); //连续点击,ul的可见和隐藏进行切换
       });
    </script>
</body>
</html>